By Martin Heinz
_object = object()
def my_function(arg, arg_with_non_None_default = _object):
if arg_with_non_None_default is _object:
print("Default value provided")
Jun 29, 20241 min read
By Martin Heinz
_object = object()
def my_function(arg, arg_with_non_None_default = _object):
if arg_with_non_None_default is _object:
print("Default value provided")